package com.dsz.day4.thread;

public class testthread {
    public static void main(String[] args) {

     Thread t1 = new MyThread();
     t1.start();
//    4.这里启动线程
        for (int i = 0; i < 10; i++){
            System.out.println("主线程开始运行"+i);
        }



    }
}

    class MyThread extends Thread{
        @Override
        public void run() {
            for (int i = 0; i < 10; i++){
                System.out.println("子线程开始运行"+i);
            }

        }
    }

